package com.cookie.framework.view;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.view.WindowManager;

/**
 * 项目名:    MeetProject
 * 包名:      com.cookie.framework.view
 * 文件名:    DialogView
 * 创建者:    cookie
 * 创建时间:   2020/1/1 14:18
 * 描述:      自定义提示框
 */

public class DialogView extends Dialog {

    public DialogView(Context context, int layout, int style, int gravity) {
        super(context, style);
        setContentView(layout);
        Window window = getWindow();
        WindowManager.LayoutParams layoutParams = window.getAttributes();
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
        layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
        layoutParams.gravity = gravity;
        window.setAttributes(layoutParams);
    }
}
